'use strict';

const { Controller} = require('ee-core');
const _ = require('lodash');
const axios = require("axios")
const async = require('async');
const {ipcMain,BrowserWindow,app } = require("electron");


/**
 * media
 * @class
 */
class MediaController extends Controller {


    constructor(ctx) {
        super(ctx);
    }

    /**
     * 队列发布任务
     */
    async channels(arg) {
        await  this.service.media.runTasks(arg);
    }

    /**
     * 获取视频号数据列表
     */
    getChannelsDataList(arg){


    }


    /**
     * 获取草稿箱列表
     */
    async getDraftsList(arg){
        let res = await this.service.media.getDraftList(arg);
        return JSON.stringify(res.data)
    }


    /**
     * 根据id删除视频
     * @param arg
     * @returns {Promise<void>}
     */
    async deleteVideo(arg){
        return  await this.service.media.deleteChannelsVideo(arg)
    }



}

MediaController.toString = () => '[class MediaController]';
module.exports = MediaController;